//package cn.sinothk.hussars.base
//
//import cn.sinothk.hussars.parent.TitleBaseActivity
//
//abstract class PermissionsBaseActivity : TitleBaseActivity() {
//
////    open fun checkPermissions(flag: String, permissions: Array<String>) {
////
////        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
////            if (PermissionManager.haveAllPermission(this, permissions)) {
////                doPermissionsEvent(flag)
////            } else {
////                PermissionManager.requestAllPermission(this, object : PermissionResultListener {
////                    override fun permissionFail(p0: Array<out String>?) {
////                        doPermissionsEvent(flag)
////                    }
////
////                    override fun permissionSuccess(p0: Array<out String>?) {
////                        checkPermissions(flag, permissions)
////                    }
////                }, permissions, true, tip)
////            }
////        }else{
////            checkPermissions(flag, permissions)
////        }
////    }
////
////    open fun doPermissionsEvent(flag: String) {
////    }
////
////    companion object {
////
////        val tip = PermissionsUtil.TipInfo("授权提示", "获取必须的手机权限不全，可能影响使用！", "继续使用", "手动授权")
////
////        val permissionsPhone = arrayOf(
////            Manifest.permission.READ_PHONE_STATE
////        )
////
////        val permissionsLocation = arrayOf(
////            Manifest.permission.ACCESS_COARSE_LOCATION,
////            Manifest.permission.ACCESS_FINE_LOCATION
////        )
////
////        val permissionsImg = arrayOf(
////            Manifest.permission.CAMERA,
////            Manifest.permission.RECORD_AUDIO,
////            Manifest.permission.WRITE_EXTERNAL_STORAGE,
////            Manifest.permission.READ_EXTERNAL_STORAGE
////        )
////
////        val permissionsAll = arrayOf(
////            Manifest.permission.WRITE_EXTERNAL_STORAGE,
////            Manifest.permission.READ_EXTERNAL_STORAGE,
////            Manifest.permission.ACCESS_NETWORK_STATE,
////            Manifest.permission.ACCESS_WIFI_STATE,
////            Manifest.permission.CAMERA,
////            Manifest.permission.RECORD_AUDIO,
////            Manifest.permission.ACCESS_COARSE_LOCATION,
////            Manifest.permission.ACCESS_FINE_LOCATION,
////            Manifest.permission.READ_PHONE_STATE,
////            Manifest.permission.CHANGE_WIFI_STATE
//////            ,android.permission.ACCESS_COARSE_LOCATION
//////            Manifest.permission.CHANGE_CONFIGURATION,
//////            Manifest.permission.WRITE_SETTINGS
////        )
////    }
//}